package com.byjc.aesb.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * RocketMQ配置类
 * 
 * @author byjc
 */
@Data
@Component
@ConfigurationProperties(prefix = "rocketmq")
public class RocketMQConfig {

    /**
     * NameServer地址
     */
    private String nameServer;

    /**
     * 生产者配置
     */
    private Producer producer;

    /**
     * 消费者配置
     */
    private Consumer consumer;

    @Data
    public static class Producer {
        /**
         * 生产者组
         */
        private String group;
    }

    @Data
    public static class Consumer {
        /**
         * 消费者组
         */
        private String group;

        /**
         * Topic名称
         */
        private String topic;

        /**
         * Key
         */
        private String key;

        /**
         * Secret
         */
        private String secret;
    }
} 